<?php echo $header; ?>

		<div id="content" class="span-24 append-bottom">
			<div id="left" class="span-5 append-1">
				<?php echo $column_left; ?><?php echo $column_right; ?>
			</div>
			<div id="right" class="span-18 last">
				<div class="top">
					<div class="left"></div>
					<div class="right"></div>
					<div class="center">
						<h1>
							<?php echo $heading_title; ?>
						</h1>
					</div>
				</div>
				<div class="middle">
					<?php if ($description) { ?>
					<div>
						<?php echo $description; ?>
					</div><?php } ?><?php if (!$categories && !$products) { ?>
					<div class="content">
						<?php echo $text_error; ?>
					</div><?php } ?><?php if ($categories) { ?>
					<table class="list">
						<?php for ($i = 0; $i < sizeof($categories); $i = $i + 4) { ?>
						<tr>
							<?php for ($j = $i; $j < ($i + 4); $j++) { ?>
							<td width="25%">
								<?php if (isset($categories[$j])) { ?><a href="%3C?php%20echo%20$categories[$j]['href'];%20?%3E"><img src="%3C?php%20echo%20$categories[$j]['thumb'];%20?%3E" title="<?php echo $categories[$j]['name']; ?>" alt="<?php echo $categories[$j]['name']; ?>" style="margin-bottom: 3px;"></a><br>
								<a href="%3C?php%20echo%20$categories[$j]['href'];%20?%3E"><?php echo $categories[$j]['name']; ?></a> <?php } ?>
							</td><?php } ?>
						</tr><?php } ?>
					</table><?php } ?><?php if ($products) { ?>
					<div class="sort">
						<div class="div1">
							<select name="sort" onchange="location = this.value">
								<?php foreach ($sorts as $sorts) { ?><?php if (($sort . '-' . $order) == $sorts['value']) { ?>
								<option value="<?php echo $sorts['href']; ?>" selected="selected">
									<?php echo $sorts['text']; ?>
								</option><?php } else { ?>
								<option value="<?php echo $sorts['href']; ?>">
									<?php echo $sorts['text']; ?>
								</option><?php } ?><?php } ?>
							</select>
						</div>
						<div class="div2">
							<?php echo $text_sort; ?>
						</div>
					</div>
					<table class="list">
						<?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
						<tr>
							<?php for ($j = $i; $j < ($i + 4); $j++) { ?>
							<td width="25%">
								<?php if (isset($products[$j])) { ?><a href="%3C?php%20echo%20$products[$j]['href'];%20?%3E"><img src="%3C?php%20echo%20$products[$j]['thumb'];%20?%3E" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>"></a><br>
								<a href="%3C?php%20echo%20$products[$j]['href'];%20?%3E"><?php echo $products[$j]['name']; ?></a><br>
								<span style="color: #999; font-size: 11px;"><?php echo $products[$j]['model']; ?></span><br>
								<?php if ($display_price) { ?> <?php if (!$products[$j]['special']) { ?> <span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span> <?php } else { ?> <span style="color: #900; font-weight: bold; text-decoration: line-through;"><?php echo $products[$j]['price']; ?></span> <span style="color: #F00;"><?php echo $products[$j]['special']; ?></span> <?php } ?> <a class="button_add_small" href="%3C?php%20echo%20$products[$j]['add'];%20?%3E" title="<?php echo $button_add_to_cart; ?>">&nbsp;</a> <?php } ?><br>
								<?php if ($products[$j]['rating']) { ?> <img src="catalog/view/theme/default/image/stars_%3C?php%20echo%20$products[$j]['rating']%20.%20'.png';%20?%3E" alt="<?php echo $products[$j]['stars']; ?>"> <?php } ?> <?php } ?>
							</td><?php } ?>
						</tr><?php } ?>
					</table>
					<div class="pagination">
						<?php echo $pagination; ?>
					</div><?php } ?>
				</div>
				<div class="bottom">
					<div class="left"></div>
					<div class="right"></div>
					<div class="center"></div>
				</div>
			</div>
		</div><?php echo $footer; ?>
	
